from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import CityViewSet, DatacenterViewSet, HostViewSet, PingHostView

router = DefaultRouter()
router.register(r'cities', CityViewSet)
router.register(r'datacenters', DatacenterViewSet)
router.register(r'hosts', HostViewSet)
urlpatterns = [
    path('', include(router.urls)),
    path('ping/<str:hostname>/', PingHostView.as_view(), name='ping-host'),
]
